﻿using Auto.AlgsAndPush.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Auto.AlgsAndPush.Services.DeviceType
{
    public class TypeFactory
    {
        private readonly HttpClientService _httpClient;

        public static BaseDeviceType GenerateType(HttpClientService httpClient, AutoProjectTypeEnum type)
        {
            return type switch
            {
                AutoProjectTypeEnum.Dist => new DistType(httpClient),
                AutoProjectTypeEnum.HydroLevel => new HydroType(httpClient),
                _ => null
            };
        }
    }
}
